package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.query.OrderQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Order entity);

    Order selectByPrimaryKey(Long id);

    List<Order> selectAll();

    int updateByPrimaryKey(Order entity);


    void insertRelation(@Param("userId") Long userId, @Param("orderId") Long orderId);

    List<Order> selectOrdersForUser(OrderQueryObject qo);

    void deleteRelation(Long id);

}